
import yagmail,logging

def send_mail(filepath):

    mail=yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com')

    mail.send(to='2314336117@qq.com',subject='孔夫子测试报告',contents='今日报告，请查看',attachments=filepath)

def log_set():
    logging.basicConfig(filename='./log/kongfzlog.txt',level=logging.DEBUG,filemode='w+',format='%(asctime)s -> %(levelname)s -> %(message)s')

import yaml

def get_data_yaml(filepath):
    with open(filepath,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)